package com.ss.android.download;

import android.content.Context;
import android.content.SharedPreferences;
import android.os.AsyncTask;
import android.text.TextUtils;

import com.bytedance.common.utility.Logger;
import com.ss.android.download.h.a;

final class j extends AsyncTask {
    private final Context a;
    private final String b;
    private final a c;

    j(Context arg1, String arg2, a arg3) {
        this.a = arg1;
        this.b = arg2;
        this.c = arg3;

    }

    private Void a() {
        Object v4;
        String[] v2_2;
        a v3;
        int v0 = 0;
        Class v1 = h.class;
        synchronized (v1) {
            SharedPreferences v2 = this.a.getSharedPreferences(this.b, 0);
            if (this.c != null) {
                v3 = this.c;
                String v2_1 = v2.getString("notifs_string", "");
                if (Logger.debug()) {
                    Logger.d("DownloadNotifier loadFromMiscConfig", v2_1);
                }

                v2_2 = v2_1.split("\\|");
                if (v2_2 == null) {
                    return null;
                }

                v4 = g.d;
                synchronized (v4) {
                    while (v0 < v2_2.length) {
                        if (TextUtils.isEmpty(v2_2[v0])) {
                            g.a(v3.a).add(v2_2[v0]);
                        }

                        ++v0;
                    }
                }
            }
            return null;
        }
    }

    protected final Object doInBackground(Object[] arg2) {
        return this.a();
    }
}

